package edu.wpi.first.wpilibj.templates;






import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Solenoid;
import edu.wpi.first.wpilibj.SpeedController;
import edu.wpi.first.wpilibj.Timer;

public class Shooter {
    
    SpeedController flyWheel;
    double targetSpeed;
    Solenoid launcher;
    
    public Shooter(int flyWheelJag, double targetSpeed, int launcherPort)
    {
        flyWheel = new Jaguar(flyWheelJag);
        launcher = new Solenoid(launcherPort);
        this.targetSpeed = targetSpeed;
        flyWheel.set(-targetSpeed);
    }
    
     public double getSpeed() 
     {
         return targetSpeed;
     }
     
     public void setTargetSpeed(double targetSpeed) 
     {
        this.targetSpeed = targetSpeed;
        flyWheel.set(-targetSpeed);
     }
     
     public void fire()
     {
        launcher.set(true);
     }
     
     public void reset()
     {
         launcher.set(false);
     }
     
}
